<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('印章使用申请单打印')" />
	<style type="text/css">
	body {
			overflow-x: auto;
		}
		table {
			font-size: 14px;
			font-weight:500;
			font-family: 线体;
			margin-left: 50px;
	    	border-collapse: collapse;
		}
	    table, tr, td{
		    text-align: center;
		    width: 1200px;
		    height: 40px;
		}
		.items td{ height:30px; border: 1px solid black;}
		
		@media print{
		   body {
		       height: auto !important;
		   }
		}
	</style>
</head>
<body class="white-bg">
    <table style="margin-top: 0px;">
		<!-- 打印网页时通过hidden-print隐藏元素 -->
	    <div class="text-right hidden-print">
	        <input th:value="${obj.id}" type="hidden" id="id" name="id" />
	        <input type="hidden" id="zlwj" th:value="${obj.zlwj}" />
            <button id="button-yes" type="button" class="btn btn-sm btn-primary" ><i class="fa fa-check"></i>审核通过</button>&nbsp;
            <button id="button-no" type="button" class="btn btn-sm btn-danger" ><i class="fa fa-remove"></i>审核拒绝</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
	    </div>
	    <tr>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 20%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 20%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 20%">&nbsp;</td>
		</tr>
	    <tr style="height: 60px;">
			<td ><img style="height: 30px" src="/ruoyi.png"></td>
			<td colspan="5" style="font-size: 30px;font-family: 线体;font-weight:500;">湖北鄂能电力建设有限公司-印章使用申请单</td>
		</tr>
	</table>
	<table class="items">
		<tr>
			<td style="width: 10%"><b>文件名称</b></td>
			<td style="width: 20%" th:text="${obj.name}">&nbsp;</td>
			<td style="width: 10%"><b>报送单位</b></td>
			<td style="width: 20%" th:text="${obj.bsdw}">&nbsp;</td>
			<td style="width: 10%"><b>申请人</b></td>
			<td style="width: 20%" th:text="${obj.sqr}">&nbsp;</td>
		</tr>
		<tr>
			<td ><b>印章类型</b></td>
			<td th:text="${obj.type}">&nbsp;</td>
			<td ><b>用印数量</b></td>
			<td th:text="${obj.shul}">&nbsp;</td>
			<td ><b>申请日期</b></td>
			<td th:text="${#dates.format(obj.riq, 'yyyy-MM-dd')}">&nbsp;</td>
		</tr>
		<tr>
			<td  rowspan="3"><b>申请使用事由</b></td>
			<td colspan="5" th:text="${obj.descs}">&nbsp;</td>
		</tr>
		<tr>
			<td colspan="5" >&nbsp;</td>
		</tr>
		<tr>
			<td colspan="5" >&nbsp;</td>
		</tr>
	</table>
	<table style="margin-top: 15px;hidden-print;" >
		<tr>
			<td colspan="2" style="width: 22%;text-align: left;"><b>申请人：</b><span th:text="${obj.jbr}"></span></td>
			<td colspan="2" style="width: 14%;text-align: left;"><b>印章管理员：</b><span th:text="${obj.spr}"></span></td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 10%">&nbsp;</td>
		</tr>
		<tr>
			<td colspan="7" style="text-align: left;" class="hidden-print">
				资料文件：
                <div style="margin-top: 8px;" id="zlwjlink"></div>
			</td>
		</tr>
	</table>
    <th:block th:include="include :: footer" />
    <script th:src="@{/ruoyi/base64.min.js?v=20231208}"></script>
    <script type="text/javascript">
        function printPage() {
            window.print();
        }
        
        $(function() {
			var zilwj = $("#zlwj").val();
        	
        	var n=zilwj.split(",");
        	for(var i=0;i<n.length;i++){
//         		var url = "http://lkgnews.cn:8012/onlinePreview?url="+encodeURIComponent(Base64.encode(n[i]));
        		var url = n[i];
        		$("#zlwjlink").append("<a href='"+url+"' target='_blank' >"+n[i]+"</a><br>");
        	}
        });
        
        $("#button-yes").click(function(){
	    	$.modal.confirm("确认要审核通过吗?", function() {
	    		$.ajax({
    				url: "/gcgl/yzsp/zjlyes",
    				type: "post",
    				data: { "ids": $("#id").val() },
    				dataType: 'json',
    				success: function(data) {
    					$.operate.saveReload(data);
    				},
    				error: function(xhr, type, errorThrown) {
    					//异常处理；
    					$.modal.alert("请稍后再试！");
    					$.operate.saveReload(data);
    				}
    			});
	    	});
	    })
	    
	    $("#button-no").click(function(){
	    	$.modal.confirm("确认要审核拒绝吗?", function() {
	    		$.ajax({
    				url: "/gcgl/yzsp/zjlno",
    				type: "post",
    				data: { "ids": $("#id").val() },
    				dataType: 'json',
    				success: function(data) {
    					$.operate.saveReload(data);
    				},
    				error: function(xhr, type, errorThrown) {
    					//异常处理；
    					$.modal.alert("请稍后再试！");
    					$.operate.saveReload(data);
    				}
    			});
	    	});
	    })
    </script>
</body>
</html>